<template>
	<view class='res-box'>
		<image v-if="iconPath" class="su-img" :src="iconPath" :style="iconStyle"></image>
		<icon v-else class='su-img' :type="type" size="90" :color="iconColor"/>
		<text v-if="'false' !== title" :class="['su-text', money?'fs18':'']">{{title}}</text>
		<text v-if="money" class='money-text'><text class="fs16">￥</text>{{money}}</text>
		<text v-if="content" class='checked-text'>{{content}}</text>
	</view>
</template>

<script>
	export default {
		name: 'resultComp',
		props: {
			type: {
				type: String,
				default: 'success' // success, success_no_circle, info, warn, waiting, cancel, download, search, clear
			},
			iconPath: { // 自定义的icon图片路径
				type: String,
				default: '',
			},
			iconColor:{
				type: String,
				default: '#4476A8',
			},
			iconStyle: { // 自定义的icon图片路径
				type: String,
				default: '',
			},
			title: {
				type: String,
				default: '操作成功'
			},
			money: {
				type: String,
				default: ''
			},
			content: {
				type: String,
				default:''
			}
		},
		data() {
			return {
			}
		}
	}
</script>

<style lang="scss">
	.res-box {
		/* #ifdef APP-PLUS */
		padding: 20upx;
		/* #endif */
		/* #ifndef APP-PLUS */
		padding: 80upx 0 50upx;
		/* #endif */
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background: #FFFFFF;
		margin-bottom: 20upx;
		text-align: center;
	}

	.su-text,.money-text {
		display: block;
		margin-top: 20upx;
		font-size: 40upx;
		color: #000000;
	}
	.money-text {
		font-size: 60rpx;
		margin: 0;
		margin-left: -10rpx;
	}

	.su-img {
		width: 180upx;
		height: 180upx;
	}

	.checked-text {
		display: block;
		margin-top: 20upx;
		/* #ifdef APP-PLUS */
		font-size: 32upx;
		/* #endif */
		/* #ifndef APP-PLUS */
		font-size: 28upx;
		/* #endif */
		color: #888888;
		text-align: center;
	}
</style>
